package org.example.com.Controller;

import org.example.Annoation.Controller;
import org.example.Annoation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * @author cc
 * @date 2021/8/2 19:44
 * @Description 跳转到用户列表
 */
@Controller
@RequestMapping("/sys/user")
public class UserController {


    /**
     * 跳转到用户列表
     * @author sosmcc
     * @param
     */
     @RequestMapping("/find")
    public void Userlist(){
         System.out.println("i am find method"+""+"我是测试");
     }

     @RequestMapping("/TestAllType")
     public void TestAllType(Integer a,Double b,Float c,Boolean d){
         HashMap<String, Object> map = new HashMap<>();
         System.out.println(a+""+b+""+""+c+""+d);

     }
    /**
     * 用户新增
     * @author sosmcc
     * @param
     *
     *
     */
    @RequestMapping("/add")
     public String Add(HttpServletRequest req, HttpServletResponse resp,String name){

        System.out.println("我是增加方法");
//        return "redirect:/index.html";
        return "new_app";
     }
     
     /**
      * 跳转到新增界面
      * @author sosmcc
      * @param 
      */
      @RequestMapping("/toAdd")
    public Map<String,Object> ToAdd(HttpServletRequest req, HttpServletResponse resp){
          HashMap<String, Object> hashMapte = new HashMap<>();
          hashMapte.put("k1",100);
          hashMapte.put("k2","hhh你是猪");
          return hashMapte;
      }

    public void test(){

    }
}
